package btb.net;

import btb.engine.CEvent;

@SuppressWarnings("serial")
public class CNetworkEvent extends CEvent {
	public static final int CNE_UNDEFINED_EVENT		= 0;
	public static final int CNE_LOGIN_EVENT 		= 1;
	public static final int CNE_LOGOUT_EVENT		= 2;
	public static final int CNE_CHAT_MESSAGE		= 3;
	public static final int CNE_CHAT_CHANNEL_OP		= 4;
	public static final int CNE_CHAT_UPDATE			= 5;
	
	protected Object eventPayload;
	public boolean secondaryPayload;
	
	public CNetworkEvent(Object _source, String _payload) {
		this(_source, CNE_UNDEFINED_EVENT, "");
	}
	
	public CNetworkEvent(Object _source, int _eventType, Object _payload) {
		super(_source);
		
		this.eventType = _eventType;
		this.eventPayload = _payload;
	}
	
	public Object getEventPayload() {
		return this.eventPayload;
	}
}
